﻿/***
 * 
 *    Title: "ZGUIFW"UI框架项目
 *           主题： XXXX      
 *    Description: 
 *           功能： XXXX
 *    Date: 2018
 *    Version: 0.1版本
 */
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace ZGUIFW
{
	public class PropDetailUIForm : BaseUIForm
    {
		public Text Title;
		private void Awake()
		{
			this.CurrentType.UiFormType = UIFormType.PopUP;
			this.CurrentType.UiFormLucenyType = UIFormLucenyType.Translucence;
			this.CurrentType.UiFormShowMode = UIFormShowMode.ReverseChange;
			ReceiveMessage("ShowPropDetail", HandleDelMessageDelivery);
			RigisterBtnEvent("CloseBtn", p => CloseUIForm());
		}
		private void OnDestroy()
		{
			MessageCenter.RemoveMsgListener("ShowPropDetail", HandleDelMessageDelivery);
		}

		void HandleDelMessageDelivery(KeyValueMsg msg)
		{
			if (Title == null) return;
			Title.text = msg.Value.ToString();
		}

	}
}

